<button data-title="选择商品" data-iframe="{:url('selectGoods')}?refund_id={$value}" type="button" class="layui-btn layui-btn-danger">{$label}</button>
<table class="layui-table" lay-size="sm" lay-skin="line">
    <thead>
    <tr>
        <th class='text-left nowrap'>商品LOGO</th>
        <th class='text-left nowrap'>商品名称</th>
        <th class='text-left nowrap'>商品规格</th>
        <th class='text-left nowrap'>数量</th>
        <th class='text-left nowrap'>操作</th>
    </tr>

    </thead>
    <tbody id="selectGoods">
    {volist name="goodsArr" id="goods"}
    <tr>
        <td class='text-left nowrap'>
            <img src="{$goods.logo}" width="80" height="80">
        </td>
        <td class='text-left nowrap'>
            {$goods.title}
        </td>
        <td class='text-left nowrap'>
            <select required="required"  class="layui-select full-width spec_id" name="spec_id[]"  lay-filter="spec_id">
                {foreach $goods.specs as $vo}
                <option value="{$vo.id}" data-name="{$vo.spec_name}" data-price="{$vo.price}" data-stock="{$vo.stock}" data-sale="{$vo.sale}">{$vo.spec_name}</option>
                {/foreach}
            </select>

        </td>
        <td class='text-left nowrap'>
            <input type="number" autofocus required name="num[]" value='1' title="请输入数量" placeholder="请输入数量" class="layui-input spec_num">
        </td>
        <td class='text-left nowrap'>
            <button  type="button" class="layui-btn layui-btn-sm layui-btn-danger removeGood" value="{$goods.id}">移除</button>
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
<script>

    $('.removeGood').click(function () {
        var that = this;
        $.post("{:url('removeGood')}",{good_id:$(this).val(),refund_id:"{$value}"},function(data,status){
                            if(data.code == 1){

                                $(that).parent().parent('tr').remove();
                            }
                        });

    })
</script>